package com.hulk.ratel.manage.org;

import com.hulk.common.util.SpringContextHolder;
import com.hulk.ratel.manage.bo.InitiativeScanPayReqBO;
import com.hulk.ratel.manage.bo.InitiativeScanPayRespBO;
import com.hulk.ratel.manage.org.interfaces.IScanPayApplayService;
import com.hulk.ratel.persistence.entity.TLogTxnPayRecord;
import com.hulk.ratel.persistence.entity.TTxncodeOrgClazz;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Created by hulk on 2017/11/9.
 * 被扫
 */
@Service
@Slf4j
public class InitiativeScanPayManager extends BaseManager {

    public InitiativeScanPayRespBO doPay(InitiativeScanPayReqBO reqBO, TLogTxnPayRecord record,String workId) {
        TTxncodeOrgClazz targetClazz = super.getPayorgClazz(reqBO.getOrgCode(), reqBO.getTxnCode(), workId);
        IScanPayApplayService payApplayService = SpringContextHolder.getBean(targetClazz.getClazzCode());
        return payApplayService.doPay(workId, record, reqBO);
    }
}
